#ifndef QPRINTERMANAGER_H
#define QPRINTERMANAGER_H
#ifdef WIN32
#pragma execution_character_set("utf-8")
#endif // WIN32

#include <QObject>
#include "common.h"
#include "timeUtils.h"


class PrinterManager : public QObject {

    Q_OBJECT

public:
    
    // 打印数据
    static void printDirect(QList<DaoModel::TestData>& dataList);

private:

    explicit PrinterManager(QObject* parent = nullptr);

    ~PrinterManager();

    /// <summary>
    /// 生成HTML代码
    /// </summary>
    /// <param name="record"></param>
    /// <returns></returns>
    static QString createHtml(QList<MyModel::TestData>& dataList);

    /// <summary>
    /// 填充检测数据
    /// </summary> 
    /// <param name="record"></param>
    /// <returns></returns>
    static QString insertData(QList<MyModel::TestData>& dataList);

};

#endif // QPRINTERMANAGER_H
